package com.demo.mqtt.common.fromCommon.enums;

/**
 * ? 自定义返回异常状态码， 避免前端不识别
 * Created by @kay-1005878349@qq.com on 2020/11/5 10:29
 */
public enum CustomResponseEnum {

    INVALID_TOKEN(40001, "登录信息过期, 请重新登录"),
    WRONG_PASSWORD(50002, "请输入正确的用户名密码"),
    SMS_VALIDATE_ERROR(50002, "验证码校验失败"),
    USER_NOT_FOUND(50003, "未找到该用户"),
    USER_IS_EMPTY(50004, "用户名为空"),
    UNSOPPORT_AUTH_TYPE(40002, "不支持的认证类型"),
    REFRESH_TOKEN_INVALID(40003, "refresh_token失效"),
    USER_IS_LOCK(50005, "用户已经被锁定"),
    USER_AUTH_EXPIRE(50006, "授权已过期, 请联系管理员"),
    UNKNOW_ERROR(51000, "未知异常"),
    DATA_ERROR(51001, "无测点信息"),
    WAVE_NOT_FOUND(50003, "未找到相关的波形数据");


    private Integer code;
    private String message;

    CustomResponseEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
